<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>Insert new client</title>
    </h:head>
    <h:body>
        <ui:composition template="/pages/common/layout.xhtml">
            <ui:define name="content">
                <h:form>
                    <h:outputLabel for="name" value="Name"></h:outputLabel>
                    <h:inputText id="name" value="#{clientBean.client.name}" required="true"></h:inputText>
                    <h:outputLabel for="phone_number" value="Phone number"></h:outputLabel>
                    <h:inputText id="phone_number" value="#{clientBean.client.phoneNumber}" required="true"></h:inputText>
                    <h:outputLabel for="address" value="Address"></h:outputLabel>
                    <h:inputText id="address" value="#{clientBean.client.address}" required="true"></h:inputText>
                    <h:outputLabel for="email" value="Email"></h:outputLabel>
                    <h:inputText id="email" value="#{clientBean.client.email}" required="true"></h:inputText>
                    <h:commandButton value="Add client" action="#{clientBean.addClient}">
                    </h:commandButton>
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
